package org.puremvc.as3.multicore.patterns.message
{
	import org.puremvc.as3.multicore.interfaces.IMessage;

	public class Message implements IMessage
	{
		private var name:String = '';
		
		private var body:Object;
		
		public function Message(name:String, body:Object)
		{
			this.name = name;
			this.body = body;
		}

		public function getName():String
		{
			return name;
		}
		
		public function getBody():Object
		{
			return body;
		}
		
		public function toString():String {
			if (body == null)
				return name;
			return name + " (" + body + ")";
		} 
		
	}
}